/*添加一个附件*/
function addAttach(objname,id,title,url){
    var objname_id = "#"+objname + "_id";
    var objname_detail = "#"+objname + "_detail";
    $(objname_id).val(id);

    $(objname).val(url);

    if (!title && typeof(title)!="undefined"){
        htmlstr = '无名称';
    }else{
        htmlstr = title.substring(0,6);
    }

    htmlstr += '<a class="chx blue" title="查看" target="_blank" href="'+url+'"  >查看</a><a class="blue" title="删除" onclick=\'removeAttach("'+objname+'");\' >删除</a>';
    $(objname_detail).html(htmlstr);
}